package com.study.service.impl;

import com.study.dao.UserManagerDao;
import com.study.domain.UserManager;
import com.study.service.UserManagerService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class UserManagerServiceImpl implements UserManagerService {

    @Resource
    private UserManagerDao userManagerDao;

    @Override
    public int modifyPassword(UserManager userManager) {
        return userManagerDao.updatePassword(userManager);
    }

    @Override
    public UserManager selectUserManager(String username, String password) {
        UserManager userManager = new UserManager();
        userManager.setUsername(username);
        userManager.setPassword(password);
        UserManager result = userManagerDao.queryUserManager(userManager);
        return result;
    }
}
